Skip to main content

Programatically drag-and-drop in IRSA Viewer tool via Upload feature

Project description

dnd_firefly

Programmatically Drag and Drop Files into Firefly Viewer

Overview

dnd_firefly is a command-line tool that allows you to programmatically upload local files to the Firefly Viewer (IRSA Viewer tool) by simulating a drag-and-drop action. This tool is particularly useful for automating data uploads and integrating with scripts or workflows that interact with the Firefly Viewer.

Features

  • Automate File Uploads: Upload files to the Firefly Viewer without manual intervention.
  • Simulate Drag-and-Drop: Programmatically simulate the drag-and-drop action to upload files.
  • Easy Integration: Integrate seamlessly with existing data processing pipelines or scripts.

Installation

You can install dnd_firefly directly from PyPI using pip:

pip install dnd_firefly

Note: dnd_firefly requires Python 3.11 or higher.

Requirements

  • Python 3.11+
  • Google Chrome Browser: Ensure that the latest version of Chrome is installed on your system.

How It Works

The tool uses Selenium WebDriver to automate a Chrome browser session. It opens the Firefly Viewer and simulates the drag-and-drop action to upload your specified file.

Selenium Manager: Starting from Selenium 4.6.0, Selenium includes Selenium Manager, which automatically manages the browser driver required for automation. If you have Chrome installed, Selenium will handle the rest.

Usage

The dnd_firefly tool accepts one argument: the path to the local file you want to upload to the Firefly Viewer.

Command-Line Usage

dnd_firefly /path/to/your/file.tbl

Replace /path/to/your/file.tbl with the actual path to your local file.

Example

To upload a file named WISE-allwise_p3as_psd-Cone_100asec.tbl located in your Downloads folder, run:

dnd_firefly ~/Downloads/WISE-allwise_p3as_psd-Cone_100asec.tbl

Troubleshooting

  • Selenium Exceptions: If you encounter errors related to Selenium WebDriver, ensure that you have the latest version of Chrome installed and that your Selenium version is up to date.
  • Internet Access: Selenium Manager requires internet access to download the appropriate WebDriver. If you're in an environment with restricted internet access, you may need to manually set up the WebDriver. Refer to the Selenium documentation for more details.
  • File Path Issues: Ensure that the file path you provide is correct and that the file exists.

Advanced Usage (Optional)

If you need to use a different browser or have specific requirements, you can manually set up the WebDriver.

Manual WebDriver Setup

  1. Download ChromeDriver:

    • Visit the ChromeDriver Downloads page.
    • Download the version that matches your installed Chrome browser version.
  2. Install ChromeDriver:

    • Place the chromedriver executable in a directory that's in your system's PATH, or specify its location in the code.

Note: Manual setup is only necessary if Selenium Manager is unable to manage the WebDriver automatically.

Contributing

Contributions are welcome! Please visit the GitHub repository to report issues or submit pull requests.

License

This project is licensed under the MIT License.

Author

Emmanuel Joliet

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dnd_firefly-0.2.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

dnd_firefly-0.2.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file dnd_firefly-0.2.0.tar.gz.

File metadata

  • Download URL: dnd_firefly-0.2.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for dnd_firefly-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c447d7294fe68c4a273cebe16b4e52af4a17f919f1a12127ae08fd954ecf324e
MD5 66c57a32143e255173f374e857ba1b99
BLAKE2b-256 f6b23ed442ff5586b89ca18b495c88230d2bca55766d7f9f21a5b8e8cf36a8ac

See more details on using hashes here.

File details

Details for the file dnd_firefly-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: dnd_firefly-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for dnd_firefly-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56e98dba50a61c55833f0b806ea87813a96f1f9412328b4f934b3f5e84961814
MD5 209ebd831e4194398d9d9e2a0108699f
BLAKE2b-256 dbb8e33318b470ecb2562addcb24815d15cc7ea286803ce0dd2140f743dd5308

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page