kauefraga / anime-list-python

📖 A command line interface to create, find and list all my viewed animes.
MIT License
1 stars 0 forks source link

`save`: verify if the file exists #2

Closed kauefraga closed 1 year ago

kauefraga commented 1 year ago

If the file already exists open it with write permissions (to overwrite) If the file does not exists open it with append permissions (to append)

suhel-45 commented 1 year ago

Hey I am Suhel I am beginner in Git Hub help me.If you do so I will be Happy I want to contribute in this repository .

kauefraga commented 1 year ago

Oh, sure. Do you have some experience with Python or Git? This issue is about the save command. This command query all animes from the database and then save it into a .csv file. The code is appending all animes every time. If you try twice the file will have "two" tables in it (replicated). We need to adjust this to "append" if the file does not exists and overwrite if the file exists.

kauefraga commented 1 year ago

This happens if you run twice. There are two tables.

-->>Title, URL, Created At
Mirai Nikki, https://betteranime.net/anime/legendado/mirai-nikki, 2023-01-04 22:33:16.805562
Beast Tamer, https://betteranime.net/anime/legendado/yuusha-party-wo-tsuihou-sareta-beast-tamer-saikyoushu-no-nekomimi-shoujo-to-deau, 2023-01-04 22:33:16.873342
.............
-->>Title, URL, Created At
Mirai Nikki, https://betteranime.net/anime/legendado/mirai-nikki, 2023-01-04 22:33:16.805562
Beast Tamer, https://betteranime.net/anime/legendado/yuusha-party-wo-tsuihou-sareta-beast-tamer-saikyoushu-no-nekomimi-shoujo-to-deau, 2023-01-04 22:33:16.873342
.............
suhel-45 commented 1 year ago

Currently I am pursuing engineering in computer science. I have knowledge in python. I have basic knowledge of Git

On Sun, Jan 8, 2023, 06:21 KauĂȘ Fraga Rodrigues @.***> wrote:

Oh, sure. Do you have some experience with Python or Git? This issue is about the save command https://github.com/kauefraga/anime-list/blob/main/src/commands/save.py. This command query all animes from the database and then save it into a .csv file. The code is appending all animes every time. If you try twice the file will have "two" tables in it (replicated). We need to adjust this to "append" if the file does not exists and overwrite if the file exists.

— Reply to this email directly, view it on GitHub https://github.com/kauefraga/anime-list/issues/2#issuecomment-1374673508, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4LKE6CSYT55IKJILNSCWJ3WRIFP3ANCNFSM6AAAAAATUFYNRQ . You are receiving this because you commented.Message ID: @.***>

kauefraga commented 1 year ago

That's awesome! The README has some information about the project, read it. Then clone it (git clone https://github.com/kauefraga/anime-list.git), code something and try to open a pull request closing this issue #2. Or just code something and send me here in the issue. Let me know if you need some help.

suhel-45 commented 1 year ago

Hii I need your help . I am unable to run the project in my editor I tried with vscode and pycharm Please help me🙏

On Sun, Jan 8, 2023, 07:41 KauĂȘ Fraga Rodrigues @.***> wrote:

That's awesome! Clone it (git clone https://github.com/kauefraga/anime-list.git), code something and try to open a pull request closing this issue #2 https://github.com/kauefraga/anime-list/issues/2. Or just code something and send me here in the issue. Let me know if you need some help.

— Reply to this email directly, view it on GitHub https://github.com/kauefraga/anime-list/issues/2#issuecomment-1374687849, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4LKE6BRCYPF5GHU2HKRUT3WRIO3TANCNFSM6AAAAAATUFYNRQ . You are receiving this because you commented.Message ID: @.***>

kauefraga commented 1 year ago

Hiii! Thank you for your patience. Do you still need help? I use vscode with some extensions and it is good enough to code with Python, i recommend! When you install vscode you have the code command at terminal. Try to run it in the project directory:

code <project-dir>
# or
code . # dot means actual directory
suhel-45 commented 1 year ago
Hii ,I am glad that you replied I facing this problem (see in the terminal)   Sent from Mail for Windows From: KauĂȘ Fraga RodriguesSent: 11 January 2023 05:34To: kauefraga/anime-listCc: suhel-45; CommentSubject: Re: [kauefraga/anime-list] `save`: verify if the file exists (Issue #2) Hiii! Thank you for your patience. Do you still need help?I use vscode with some extensions and it is so good enough to code with Python, i recommend!When you install vscode you have the code command at terminal.Try to run it in the project directory:code # orcode . # dot means actual directory—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***> 
kauefraga commented 1 year ago

I can't figure out which bug it is. Try to reinstall, is may work.

suhel-45 commented 1 year ago

Why u said like that

On Thu, Jan 12, 2023, 04:08 KauĂȘ Fraga Rodrigues @.***> wrote:

I can't figure out which bug it is. Try to reinstall, is may work.

— Reply to this email directly, view it on GitHub https://github.com/kauefraga/anime-list/issues/2#issuecomment-1379574354, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4LKE6DH74OZ5YE55WIFV7LWR4Y53ANCNFSM6AAAAAATUFYNRQ . You are receiving this because you commented.Message ID: @.***>