Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support config from json and env #56

Closed
wants to merge 2 commits into from

Conversation

huangnauh
Copy link

  • support env
$env:YARR_DATABASE = "D:\software\yarr\storage.db"
$env:YARR_OPENBROWSER = $True
$env:YARR_LOGPATH = "D:\software\yarr\yarr.log"
  • save log to file

  • support opml file exported from newsflow

<?xml version="1.0" encoding="utf-8"?>
<opml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0">
  <head>
    <title>Newsflow</title>
  </head>
  <body>
    <outline title="博客">
      <outline htmlUrl="https://m.thepaper.cn/list_26915" text="研习一个地方和一群人,记录城市的节奏与脉络。" title="澎湃新闻-城市漫步" xmlUrl="https://rsshub.app/thepaper/list/26915" />
    </outline>
  </body>
</opml>

@nkanaev
Copy link
Owner

nkanaev commented Apr 22, 2021

thanks for your contribution. configuring via env variables sounds reasonable, though i cannot accept it in the current form - the feature can be implemented with a few lines of code using os.Getenv, which doesn't justify including a 3rd party project.

as of opml fix - by the spec text attribute is required (while title is optional), which newsflow doesn't seem to be following. i'm happy to provide a fallback mechanism for that.

@nkanaev
Copy link
Owner

nkanaev commented Apr 22, 2021

2ae6285 resolves handling opml files.

@huangnauh huangnauh changed the title feat: support env feat: support config from json and env Apr 30, 2021
@huangnauh
Copy link
Author

thanks for your contribution. configuring via env variables sounds reasonable, though i cannot accept it in the current form - the feature can be implemented with a few lines of code using os.Getenv, which doesn't justify including a 3rd party project.

as of opml fix - by the spec text attribute is required (while title is optional), which newsflow doesn't seem to be following. i'm happy to provide a fallback mechanism for that.

Sorry for the late reply.

  • remove 3rd party code
  • add config from json and env

@nkanaev
Copy link
Owner

nkanaev commented May 3, 2021

support for configuration via env added in ff39fbf.
configuration via json is deemed redundant.

@nkanaev nkanaev closed this May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants