Commons:Sunflower

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Sunflower is an upload tool for macOS which makes it easy to batch-upload files to the Wikimedia Commons.

Setup[edit]

👉 In order to run Sunflower you need to be using macOS Monterey (12.2 or newer).

  1. Download the latest version of the App: Sunflower 0.0.2
  2. Once the download completes, locate and double click on the Sunflower.dmg file to open it.
  3. A new window will appear on your screen (may take a few seconds). In this window, use your mouse to drag the Sunflower icon into the Applications folder icon.

At this point, Sunflower is now installed, and you're free to run it in your favorite way. If you're unsure how to do this, here is one possible way:

  1. Click on the Finder icon in your Dock to make sure it is the currently active App.
  2. Open your Applications Folder by clicking the menubar in the upper left corner of your screen, click on Go > Applications.
  3. In the window that appears, find the Sunflower icon and double-click it to run the app.


⚠️ If you get an error that says "Sunflower can't be opened because Apple cannot check it for malicious software", click Cancel or Show in Finder. Locate the Sunflower icon in your Applications folder, hold down the control key on your keyboard while clicking the Sunflower icon. In this new menu that appears, click Open. If another popup appears, click the button for Open.

Using Sunflower[edit]

Main Window[edit]

Once you run Sunflower, you'll see the following window appear (it may appear white/gray depending on whether you've enabled Dark Mode).

The UI buttons work as follows (refer to the image above for the numbers below):

  1. Opens a browse window so you can select files to upload. If you are prompted to give Sunflower access to a folder, please select the option to Allow access.
  2. Opens the Global Config window, see #Global Config for details.
  3. Allows you to Login. If you are already logged in, this will display as a Play button which will allow you to upload all the files you've selected.

Preparing File Description Pages[edit]

Once you have selected files to upload, you can prepare the file description page for each media file when it gets uploaded to Commons.

In the App sidebar, click on the file you wish to enter details for.

  • In the "Title" field, enter the title to upload the file to on Commons. Please do not add include the File: prefix or any file extensions (e.g. .jpg, .png, .webm).
    ⚠️ Sunflower won't check whether the title already exists on Commons. This is intentional, in case editors wish to upload new versions of files. Please do your research before uploading!
  • Any text entered in the fields labeled "Description", "Source", "Date", "Author", and "Permission" will be used to populate the parameters of the {{Information}} template accordingly.
  • Any text entered in the "Licensing" field will be placed under the "Licensing" header on the file description page.
  • Any text entered in the "Categories" field will be appended to the end of the file description page.

👉 All form fields except for the "Title" field are optional (unless you are using #Global Config), and provided strictly for your convenience.

You can also click on eye icon in the upper right corner to show a preview of the media file for upload if it is an image file (currently only jpg & png is supported). Otherwise, you will be shown the file in Finder.

👉 If you've changed your mind about uploading a file, you can remove it by clicking its icon in the sidebar, and pressing the delete button on your keyboard.

Login[edit]

If you see a button containing an icon of a user and a question mark in the toolbar, then you need to login before you can upload anything. Simply click this button to initiate the login process.

In the window that appears, enter your Wikimedia Commons username and password, and click Submit to login.

👉 Sunflower optionally supports Special:BotPasswords. When creating a new BotPassword, please grant the following rights: Create, edit, and move pages, Upload new files, Upload, replace, and move files.

Uploading Files[edit]

Once you are logged in, you can click the Play button (where the login button used to be) to start an upload. A new window will appear, with progress bars tracking the status of each file being uploaded and the overall upload progress.

To stop an ongoing upload, click Cancel Upload (may take a few seconds to stop).

Once the upload is complete, the window will close. Each file in the sidebar will now have a green checkmark or red x-mark next to it, respectively indicating if the upload was successful or if something went wrong.

Global Config[edit]

Sunflower provides an easy way to perform batch uploads with the Global Config. Click the icon with a sheet and a gear in the toolbar to get started.

With the exception of the "Title" field, any text you enter will be inserted into the file description pages of all files you're currently preparing after you click the Play button. You can override the global config for specific files by editing their descriptions individually.

The "Title" field has a few special rules:

  • You must include the text {i} somewhere in the name of title. This will be replaced with a number (starting with 1) at upload time, which increase by 1 for every subsequent file that gets uploaded.
    For example, if you enter the text Fancy pigeons {i}, the resulting titles on Commons might look like this: File:Fancy pigeons 1.jpg, File:Fancy pigeons 2.jpg, File:Fancy pigeons 3.jpg.
  • Do not include the File: prefix or file extensions (e.g. .jpg, .png, .webm)
  • You can also include the text {d}, which will be replaced with today's date.

Menus[edit]

  • Logout: Logs you out. If you are not logged in, then this option will be greyed out.
  • Clear Global Config: Clears all fields in the Global Config.
  • Remove All Files: Clears the sidebar of all files.
  • Remove Uploaded Files: Removes all files which were successfully uploaded to Commons.

FAQ[edit]

Q: I closed the sidebar by accident, how do I reopen it?

A: In the menubar, go to View > Toggle Sidebar

Project Goals[edit]

Sunflower is a simple and fresh take on uploading files to Commons. This means it won't do everything under the sun, nor should you expect that. If you have advanced/specialized needs, I recommend using another tool, such as Pattypan, VicuñaUploader, or Pywikibot.

Contribute[edit]

  • Bug/Feature requests can be submitted to the issue tracker on GitHub, or by leaving me (FASTILY) a talk page message.
  • Sunflower is very privacy-conscious and doesn't include any tracking or telemetry, so I have no idea who is actually using the app. If you find Sunflower useful, please let me know, I'd love to hear more about how you're using it 🙂

See also[edit]

External links[edit]