Skip to content
Tags give the ability to mark specific points in history as being important
  • v0.3.2
    Release v0.3.2: Normalization, denormalization
    
    This release enables some (non-exhaustive!) support for link normalization
    and denormalization.
    Denormalization refers to multiple ways in referring the same page (e.g.,
    [[Some title]], [[:Some title]], and [[_ _:Some _ _ title _ ]]) while
    normalization refers to referring all those links in a single canonical way.
    
    Additions:
    - mediawiki.denormalizeLetter
    - mediawiki.denormalizeCategory
    - mediawiki.denormalizeLink
    - mediawiki.DenormalizeTitle
    - mediawiki.DenormalizeNamespace
      - denormalization functions to create regexr strings to match a particular
        namespace or title
    - mediawiki.NormalizeTitle
    - mediawiki.NormalizeNamespace
    - mediawiki.NormalizeLink
      - normalization functions to create a standard way to find a link
    - mediawiki test cases
    
    Changes:
    - mediawiki.Recategorize
      - uses normalization and denormalization now
    
    Bugs:
    - Denormalization does not look for URL encoded strings
      (see mediawiki.Recategorize)
    
  • v0.3.1
    Release v0.3.1: More queries; Recategorize
    
    This release adds several other queries that may be useful.
    These are Query functions QueryUnusedImages, QueryUncategorizedImages,
    and QuerySpecialPage.
    
    PerformInPages used to push DidNothingError to the result, and
    does not do any glog'ing. This release now prints errors and
    DidNothingError's to glog, and no longer appends DidNothingError
    to the result.
    
    Additions:
    - mediawiki.PerformInPageChannel
      - similar to mediawiki.PerformInPages but using a chan string.
    - mediawiki.Recategorize
      - a PageFunction that naïvely recategorizes a page by finding,
        replacing, and adding text.
    - mediawiki.QuerySpecialPage
    - mediawiki.QueryUncategorizedImages
    - mediawiki.QueryUnusedImages
      - queries an arbitrary special page (https://www.mediawiki.org/wiki/API:Querypage),
        Special:UncategorizedImages, and Special:UnusedImages
    
    Changes:
    - mediawiki
      - added documentation on bot passwords and liability.
      - now uses go-mwclient v1.1.2
    - mediawiki.DefaultUserAgent
      - changed it to a Mediawiki-formatted link ([https://... sonchou]).
    - mediawiki.DidNothingError
      - Pagename is now exported that can be used directly.
    - mediawiki.PerformInPages
      - errors now get printed to glog.Error and DidNothingErrors and successes
        are printed to glog.Info.
      - DidNothingErrors no longer printed to output.
    
  • v0.3.0
    Release v0.3.0: Queries and empty interfaces in PageFunction
    
    This release features the addition of queries to hopefully simplify things.
    Query functions QueryCategoryMembers, QueryLinks, and QueryFiles
    allows the user to query for category members of a category,
    links used by a page, and files used by a page.
    All return a chan string.
    
    PageFunction is changed to allow for more parameters: optional ...interface{}.
    The optional parameter allows more flexibility in writing functions that can
    change their behavior, but at the same time with the cost of forgoing type
    safety (after all these are empty interfaces).
    
    To mitigate this, Perform is implemented as a wrapper around PageFunction
    so that it can catch any panics that PageFunction may raise.
    For instance, consider PrintPageAndContents and PrintPageAndContentsSafe,
    which prints the page title and the first optional[0] lines.
    Both of these perform the same task but the first is radically more unsafe
    than the second.
    Fortunately Perform will catch any attempts of panicking.
    
    Additions:
    - mediawiki.Perform
      - performs a PageFunction on a single page and returns a single error.
        Can handle a panic caused by a PageFunction.
    - mediawiki.PerformInPages
      - performs a PageFunctions on the pages encoded in a slice of strings
        and returns a slice of errors
    - mediawiki.QueryCategoryMembers
      - returns a channel containing the members of a category
    - mediawiki.QueryLinks
      - returns a channel containing the links used by a page
    - mediawiki.QueryFiles
      - returns a channel containing the files used by a page
    - mediawiki.PrintPageAndContents and mediawiki.PrintPageAndContentsSafe
      - functions that returns the page title and its contents for some number
        of lines. Showcases that PageFunctions can be written in both safe
        and unsafe ways. Either way both will be caught by mediawiki.Perform.
    
    Changes:
    - mediawiki.PageFunction
      - addition of optional ...interface{}
    - mediawiki.PerformInCategory, mediawiki.PerformInLinks, mediawiki.PerformInFiles
      - querying is done using the Query functions described earlier.
    
  • v0.2.2
    Release v0.2.2: Hotfix Patch
    
    Always test your functions locally before pushing them, melancholera.
    
    Additions:
    - mediawiki.DidNothingError
      - an error type that can be used to signal when a PageFunction does nothing to a page.
        Not really an error though, and PerformInCategory will not recognize this as an error.
    Changes:
    - mediawiki.CategorizeToNLVillagerHouses
      - fixed a bug that prevents this function from actually working:
        apparently I have to check for the SUFFIX of pagename instead of the PREFIX for `` NL.jpg``.
      - added checks for ending with `` NL.jpeg`` and `` NL.png``
    - mediawiki.PerformInCategory
      - added printing to glog for each page; either to Error or to Info.
    
  • v0.2.1
    10d7d15d · Improved documentation ·
    Release v0.2.1: Document Everything edition
    
    The greatest contribution is the addition of documentation in the
    source code for godoc to parse.
    The documentation here should be sufficient to understand the
    commands and packages for sonchou.
    
    I can't believe I haven't done this earlier.
    
    Additions:
    - images.StackVertically and cmd/stackVertically
      - a way to stack images vertically with ease.
    - mediawiki.PerformInCategory (mediawiki/MassEdit.go)
      - perform a PageFunction through all pages in some category.
    - doc.go
      - documentation of the sonchou project for godoc to read
    - NOTICE.md
      - third-party software notices and information.
        Essentially license info for all dependencies.
    
    Changes:
    - cmd/lookuprename
      - changed behavior such that it will actually trim those comments.
        The previous behavior is erroneous and I am to blame.
    - cmd/readAllDimensions
      - cosmetic changes; just to fit changes from images
    - cmd/fitToCanvas
      - changed bug where if minsize != 0 picture may still be a square
        even if nosquare is raised.
      - if file can't be opened it will print to glog.Warning instead of Error
    - images.FileToImage
      - added note that file should be able to open BMP, GIF, JPEG, and PNG files
    - images.FitToDimensions
      - minor cosmetic changes to make the code appear nicer
    - images.SaveTo
      - now wraps the error instead of appending message (WithMessagef->Wrapf)
      - adds note where filename will be overwritten
    - mediawiki.BatchUpload
      - if paramFunc returns nil or if paramFunc["filename"] is set to blank string
        it will skip the file instead of forcing it to OpenAndUpload.
    - mediawiki.OpenAndUpload
      - added note that remote need not start with "File:"
    
    Deletions:
    - .gitmodules
      - removed vendor for go-mwclient since v0.2.0
    - files/README.adoc and cmd/readAllDimensions/README.adoc
      - no longer necessary; just refer to godoc
    
  • v0.2.0
    Release 0.2.0: something? edition
    
    The major change in this "minor" release is that
    go-mwclient is no longer being vendored,
    thus depending on gitlab.com/melancholera/go-mwclient@v1.1.0.
    Isn't that neat?
    
    Changes:
    - cmd/fitToCanvas: added inferred mode
    - pkg/images.ReadDimensions: dimensions are now uint
    - pkg/mediawiki.BatchUpload: prints number of uploaded to glog.Info
    
    Removed:
    - .gitlab-ci.yml. I'll deal with devops sometime.
    
  • v0.1.3
    Release v0.1.3: Mediawiki and other goodies
    
    Added cmd/lookuprename and pkg/mediawiki
    Added go-mwclient as a submodule
    
  • v0.1.2
    Added gitlab-ci
    
  • v0.1.1
    daee94b7 · Improved error handling ·
    Improved error handling
    
  • v0.1.0
    Initial version: make public edition