Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm starting work on a new project and I need to know the feasibility of the end-result. I need a lot of things to happen automatically.

  1. Detect if a new file has been added to a folder
  2. Login to a website (like Strava or TrainingPeaks)
  3. Upload the file to my account on the website

Any advice on this front is appreciated. I really just need to know if this is possible and what I would need to make it happen.

share|improve this question
add comment

closed as too broad by jasonwryan, terdon, Anthon, peterph, vonbrand Feb 27 at 21:23

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

To detect when a new file is created in or under a directory, use the inotify facility. See Can a bash script be hooked to a file? and How to run a command when a directory's contents are updated? for examples.

Logging in to a website is very dependent on how the website manages authentication. Uploading the file is generally simple once you're authenticated but there's no standard for what URL and parameters to use. So you need to figure that out site per site. See Automating tasks on a website on a headless server, Is there a way to use curl interactively? Or is there an interactive curl/wget shell?, Does anybody here have experience in automating some tasks in web applications using curl? for some examples.

share|improve this answer
    
+1 very nice sampling of good answers to these questions within our site! –  slm Dec 27 '13 at 2:34
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.