#27 added image of new fedora banner to README.md
Closed 4 years ago by ankursinha. Opened 4 years ago by sash713.
Unknown source master  into  master

file modified
+2 -2
@@ -1,4 +1,4 @@

- Welcome to Fedora!

+ # Welcome to Fedora!

  ------------------

  

  Welcome to the Fedora community! We are the people that make the Fedora operating system (and all the other cool stuff around it)!
@@ -22,7 +22,7 @@

  

  We use tags to mark the status of each ticket. Tags starting with "S:" track

  the status of the ticket from Jane's perspective. Tags starting with "C:" track

- the status of the ticket from the community's perspective.

+ the status of the ticket from the community's perspective. Tags starting with "I:" track Jane's interests.

  

  - We add Jane to the [Fedora Join group on Pagure](https://pagure.io/group/fedora-join). This gives Jane permissions to interact with the [Pagure projects that Fedora Join has](https://pagure.io/projects/fedora-join/%2A).

  - Then, we open a new "Hello Fedora World" ticket for Jane. The associated tag is: [S: Hello Fedora World](https://pagure.io/fedora-join/Welcome-to-Fedora/issues?tags=S%3A+Hello+Fedora+world).

empty or binary file added
@@ -1,23 +0,0 @@

- Check FAS user status.

- 

- ## Configuration:

- rename `myconfig.cfg.example` to `myconfig.cfg` and edit it accordingly (it contains your FAS credentials).

- 

- ## Syntax:

- `python3 check.py username days`

- 

- Where `username` is the FAS user to check and `days` is the number of days to check on datagrepper in order to

- get a list of activities logged from the fedmsg bus.

- 

- ## Results

- The script output is as follow:

- 

- * Username

- * Human name

- * Last seen (date of last FAS login)

- * Groups

-   * list of FAS group membership, status and approval date

-   * total number of groups the user is member of

- * Activities in the last X days:

-   * a list of activity topics grabbed from datagrepper

-   * total number of activities

@@ -1,94 +0,0 @@

- import time

- import datetime

- import dateutil.relativedelta

- import configparser

- import requests

- from fedora.client.fas2 import AccountSystem

- import sys

- 

- configfile = 'myconfig.cfg'

- 

- config = configparser.ConfigParser()

- config.read(configfile)

- options = config.options('FAS')

- userdata = {}

- 

- for opt in options:

-     userdata[opt] = config.get('FAS', opt)

- 

- user = userdata['user']

- password = userdata['pass']

- 

- fas = AccountSystem(username=user, password=password)

- fas.timeout = 600

- fas.retries = 3

- 

- activity_baseurl = 'https://apps.fedoraproject.org/datagrepper/raw'

- 

- 

- def getactivitycount(username,days):

-     days = int(days)

-     today = datetime.date.today()

-     d = datetime.datetime.strptime(today.strftime("%Y-%m-%d %H:%M:%S"), "%Y-%m-%d %H:%M:%S")

-     d = d - dateutil.relativedelta.relativedelta(days=days)

-     start = time.mktime(datetime.datetime.strptime(str(d), "%Y-%m-%d %H:%M:%S").timetuple())

- 

-     activity_params = {'rows_per_page': 100, 'size': 'small', 'start': start, 'user': username}

- 

-     activity_results = requests.get(activity_baseurl, params=activity_params).json()

- 

-     pages = activity_results['pages']

- 

-     for i in range(0, pages):

-         # print("aaaaaaaaaaaaaaaaaa",i)

-         activity_params2 = {'page': 1, 'rows_per_page': 100, 'size': 'small', 'start': start, 'user': username}

-         activity_results2 = requests.get(activity_baseurl, params=activity_params2).json()

- 

-         for j in range(0, len(activity_results2['raw_messages'])):

-             # print(j,len(activity_results2['raw_messages']))

-             msgdate = datetime.datetime.fromtimestamp(int(activity_results2['raw_messages'][j]['timestamp']))

-             topic = activity_results2['raw_messages'][j]['topic']

- 

-             print("\t", msgdate, topic)

- 

-     return [activity_results['total'], d]

- 

- 

- class Groups:

- 

-     def __init__(self, groups):

-         self.count = 0

-         self.role_status = "na"

-         for group in groups:

- 

-             # self.role_status = groups[group]['role_status']

-             # self.approval = groups[group]['approval']

-             print("\t", group, groups[group]['role_status'], groups[group]['approval'])

-             self.count += 1

- 

-     def count_groups(self):

-         return self.count

- 

- 

- def main(username,days):

- 

-     print("Username:", username)

-     fas_user = fas.person_by_username(username)

-     print("Human name:", fas_user['human_name'])

-     last_seen = datetime.datetime.strptime(fas_user['last_seen'], "%Y-%m-%d %H:%M:%S.%f%z").strftime(

-         "%Y-%m-%d %H:%M:%S")

-     print("Last seen:", last_seen)

-     print("Groups:")

-     count_groups = Groups(fas_user['group_roles']).count_groups()

-     print("Total groups:", count_groups)

-     print("Activities:")

-     activities = getactivitycount(username, days)

-     date = datetime.datetime.strptime(str(activities[1]), "%Y-%m-%d %H:%M:%S").strftime("%Y-%m-%d")

-     print("Total activities since {}: {}".format(date, activities[0]))

- 

- 

- if __name__ == '__main__':

-     usernametocheck = sys.argv[1]

-     lastactivitiessincedays = sys.argv[2]

-     main(usernametocheck, lastactivitiessincedays)

-     print("End") 

\ No newline at end of file

@@ -1,3 +0,0 @@

- [FAS]

- user: fasuser

- pass: faspassword 

\ No newline at end of file

I have resized the image to fit within the page. The size seems to be fine now.

Will it resize on a mobile phone (different screen sizes)?

I was thinking maybe it'll be best to use inline HTML itself instead of Markdown for this sort of thing? One could then just use something like <img .. width="80%"> which would fit all platforms?

https://daringfireball.net/projects/markdown/syntax#html

Okay will change it

Do experiment and see what works best. It was only a suggestion, but you should decide what the best approach here is :smiley:

1 new commit added

  • Update README.md
4 years ago

Are you sure that pagure's README.md display system has a HTML parser, the exact same link returns an error.

Well, pagure uses python-markdown which should implement the complete
markdown standard.

--
Thanks,

Ankur

(Sent from mobile device)

2 new commits added

  • Update README.md
  • Update README.md
4 years ago

Unfortunately HTML doesn't seem to work as well. I hosted the image on imgur and wrote the HTML. I also tried implementing it on GitHub and it seems to work there . Looks like there is no HTML support (at least for image display) on pagure. Should I raise a feature request?

4 new commits added

  • Update README.md
  • Update README.md
  • Update README.md
  • Update README.md
4 years ago

I have fixed the image resizing issue and commited it please check it out.

Can you please squash the commits into one? 26 commits for a one line change are a bit much :)

If you are unsure how to do so, please look at posts like this one (or ping me in the channel and I can help there): Git: Squash your latests commits into one · Ariejan de Vroom

Ah! Yeah. It works also on mobile.

Only one thing. We could get rid of the title "Welcome to Fedora!" or use the right tag to make it a title, because now the text size is the same as the body content.

1 new commit added

  • Update README.md
4 years ago

rebased onto d42714a

4 years ago

Can you please squash the commits into one? 26 commits for a one line change are a bit much :)
If you are unsure how to do so, please look at posts like this one (or ping me in the channel and I can help there): Git: Squash your latests commits into one · Ariejan de Vroom

I have squashed them into 1 commit

Thank you @sash713 for your work.
But why using imgur?
Can't we create a folder in this repository and put the image there?
What do you think @ankursinha?

+1

All the artwork we use should stay in this repo. That also makes it easy for other community members to find.

Thanks very much @sash713

Uh, there seems to be a bit of a clash---the rebasing has deleted a few other files. We'll have to fix that before we merge this, so please keep that in mind.

shall i just open a new pull request ?

But these files should be already deleted. I removed them some time ago from this repository to put them in the fedora-join one
🤔

Ah, weird then, but nothing to worry about XD

--
Thanks,

Ankur

(Sent from mobile device)

1 new commit added

  • stored image locally
4 years ago

The relative path doesn't work eh?

Another thing @sash713, I'm not a git expert (I always make a lot of mistakes) but before submitting a PR, you should be sure that all is working on your forked repository. When you are ready, you submit a PR

1 new commit added

  • locally sourced image
4 years ago

The relative path doesn't work eh?
Another thing @sash713, I'm not a git expert (I always make a lot of mistakes) but before submitting a PR, you should be sure that all is working on your forked repository. When you are ready, you submit a PR

it worked on the local markdown editor, hence i submitted the PR

Mmm. In your forked repository the image doesn't appear. Maybe it needs the full path? I'm not sure.

2 new commits added

  • Update README.md
  • Update README.md
4 years ago

Squashed, reorganised, merged. Please update your fork now and proceed with new PRs. :sparkles:

Pull-Request has been closed by ankursinha

4 years ago