Commit graph

39 commits

Author SHA1 Message Date
barredterra
433b285b92 refactor: use provide_binary_file 2022-11-26 20:08:50 +01:00
Suraj Shetty
d4166dbe20 refactor: Replace html2text with markdownify 2022-07-06 08:23:14 +05:30
Gavin D'souza
b696fa6da5 perf: Pre-compile and re-use regexp pattern
Converted all possible usages of re.* that weren't compiling the regex
separately and re-using it. Separated out the compiled patterns as
global variables. Repetitive patterns could be made DRY-er.

Would be nicer to have all regexes in a single module so that we could
re-use better, keep track of outdated, and keep checks for possible
reDos' etc
2022-06-08 14:07:38 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Ankush Menat
eda052529b
fix: calling non-exisitng unescape method on HTML2Text (#15796)
test: xlsxutils
2022-01-30 12:17:02 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Rohan Bansal
86851028ea feat: manage Python 3 compatiblity with dependencies 2021-04-14 14:40:58 +05:30
Suraj Shetty
f1cb8f4e5c feat: Pass custom widths for excel columns 2020-10-16 13:42:00 +05:30
Faris Ansari
d2fe007177 fix(xls): Don't remove first row 2019-09-29 22:41:30 +05:30
Faris Ansari
d07ac06e5c fix: Export to Excel 2019-09-29 22:41:29 +05:30
Faris Ansari
07eedad5bb fix: Parse .xls and .xlsx files in import 2019-09-29 22:41:29 +05:30
Faris Ansari
2677e54e9d fix(xlsx): Fix for handle failed html parse 2019-04-11 14:54:42 +05:30
Frappe Bot
94ea028db3 Merge branch 'master' into develop 2019-03-08 09:38:18 +00:00
Rushabh Mehta
9df07891ff fix(xmlx): handle unparseable HTML 2019-03-06 16:11:06 +05:30
Sagar Vora
ef82f39f99 Merge branch 'staging' into develop 2019-01-29 18:24:11 +05:30
Aditya Hase
6b72faf44f style: Linting fixes (#6809)
* style: Remove unused imports

* style: Remove unused local variables
2019-01-23 16:39:55 +05:30
RA-dim
144d6f8cc2 fix[Data Import]: "Not found" error on recently uploaded XLSX file. (#6510) 2018-11-22 09:42:46 +05:30
Frappe Bot
478e60fdb1 Merge branch 'staging' into develop 2018-11-09 10:18:33 +00:00
Frappe Bot
c373a172af Merge branch 'master' into staging-fixes 2018-11-09 10:08:19 +00:00
gshmu
a2642868a5 fix read_xlsx_file_from_attached_file when xlsx contain functions (#6400) 2018-11-09 10:53:03 +05:30
Chinmay Pai
8943f6cfd5
file-api: migration improvements and fixes
* migrate more functions to file class
* add get_content(), returns file content from file_name
* move get_file_path() to get_full_path() to decrease naming ambiguity

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
2018-09-06 17:30:33 +05:30
Chinmay Pai
22ba310aaf
[2/3] file-api: code migration
migrate api from file_manager.py to file.py

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
2018-09-03 18:04:45 +05:30
rohitwaghchaure
a5d7182817 [Fix] Ascii code issue while downloading report (#5990) 2018-08-21 11:21:40 +05:30
Faris Ansari
217156e5fa
Add filepath param in read_xlsx (#5465) 2018-04-18 16:38:57 +05:30
Suraj Shetty
436d7a0d4e Data export tool (#5213)
* Data export tool
New doctype to export data
Child table export option
Ability to add filter

* Filter view refactor
Separated filter css

* Moved exporter script from data import doctype to data export doctype

* some input validation

* removed unwanted file and some style fixes

* removed console log

* hide sidebar

* renamed export method

* added data export link in setup module page

* minor fix

* refactor exporter.py

* data export ui tweaks

* codacy and bug fix

* silly code fixes

* [minor] indentation fix
2018-03-22 11:30:48 +05:30
Achilles Rasquinha
611a74445e fixed bytesio object generation for python 2 and 3 for excel, wtf email 2018-03-20 01:07:17 +05:30
Prateeksha Singh
ae0234e7e6 [export-fields] export comma separated lines for long values (#4667)
* [export-fields] export comma separated lines for long values, fixes frappe/erpnext#12085

* Update xlsxutils.py
2017-12-22 11:11:13 +05:30
Rohit Waghchaure
f8928dc999 [fix] Not able to export general ledger report's data if data has illegal characters 2017-11-03 15:01:42 +05:30
Saurabh
133df77d31 [fix] revert unicode dencoding 2017-11-03 11:47:39 +05:30
Rohit Waghchaure
05808554a0 [fix] Not able to export general ledger report's data in excel 2017-10-30 13:42:49 +05:30
Ben Cornwell-Mott
0bc85c7431 Allow workbook pass in make_xlsx 2017-09-23 15:32:06 -07:00
Aditya Hase
769338f136 Replaced all instances of basestring with six.string_types 2017-08-11 00:10:11 +05:30
Aditya Hase
d3395dfd28 Replaced StringIO and cStringIO imports with six.StringIO (#3810)
StringIO and cStringIO modules are replaced with io.StringIO in
Python 3. six.StringIO is an alias for StringIO.StringIO in
Python 2 and io.StringIO in Python 3
2017-07-31 10:54:17 +05:30
Faris Ansari
f16854559d [minor] Handle string with no html tag in xlsxutils (#3332) 2017-05-18 13:39:07 +05:30
Manas Solanki
5315bea77f Data Import Tool in excel file format (#3231)
* Data Import in excel file format

* Include test case and minor fixes

* typos
2017-05-18 11:40:44 +05:30
Manas Solanki
bfb181333c handle the escape sequence in the html2text library (#3272) 2017-05-12 15:23:11 +05:30
mbauskar
3319257d0f [fixed] error while exporting the report in excel format 2017-05-02 14:05:39 +05:30
OlaAkeela
512bcd39d5 remove html tags when exporting report in excel format (#3174)
* remove html tags when exporting report in excel format

* remove html tags when export report as excel using html2text
2017-05-01 12:17:15 +05:30
Manas Solanki
a9d5715f8a Fix for opening the file in mac and some styling in excel file 2017-02-14 18:34:35 +05:30