akvo / akvo-flow-services

Akvo Flow service applications for reporting, bulk uploads and others
Other
4 stars 1 forks source link

Refactor bulk upload #33

Closed iperdomo closed 4 years ago

iperdomo commented 10 years ago

The current bulk upload relies on the applet code. The process is straight forward and can be re-implemented in Clojure.

iperdomo commented 10 years ago

As @ichinaski suggests in https://github.com/akvo/akvo-flow/issues/652 if we find an image, we just need to upload it, no re-sizing is needed.

iperdomo commented 10 years ago

Some idea for detecting duplicate lines

(defn get-data [f]
  (let [zf (ZipFile. f)
        entry (.getEntry zf "data.txt")]
    (if entry
      (line-seq (io/reader (.getInputStream zf entry)))
      "")))

(reduce conj #{} (mapcat get-data (fs/find-files "/path/to/folder" #".*\.zip$")))
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.