pub-analyzer 0.5.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. pub_analyzer/__init__.py +1 -0
  2. pub_analyzer/__main__.py +7 -0
  3. pub_analyzer/css/body.tcss +87 -0
  4. pub_analyzer/css/buttons.tcss +24 -0
  5. pub_analyzer/css/checkbox.tcss +29 -0
  6. pub_analyzer/css/collapsible.tcss +31 -0
  7. pub_analyzer/css/datatable.tcss +50 -0
  8. pub_analyzer/css/editor.tcss +60 -0
  9. pub_analyzer/css/main.tcss +50 -0
  10. pub_analyzer/css/report.tcss +131 -0
  11. pub_analyzer/css/search.tcss +81 -0
  12. pub_analyzer/css/summary.tcss +75 -0
  13. pub_analyzer/css/tabs.tcss +18 -0
  14. pub_analyzer/css/tree.tcss +44 -0
  15. pub_analyzer/internal/__init__.py +1 -0
  16. pub_analyzer/internal/identifier.py +106 -0
  17. pub_analyzer/internal/limiter.py +34 -0
  18. pub_analyzer/internal/render.py +41 -0
  19. pub_analyzer/internal/report.py +497 -0
  20. pub_analyzer/internal/templates/author_report.typ +591 -0
  21. pub_analyzer/main.py +81 -0
  22. pub_analyzer/models/__init__.py +1 -0
  23. pub_analyzer/models/author.py +87 -0
  24. pub_analyzer/models/concept.py +19 -0
  25. pub_analyzer/models/institution.py +138 -0
  26. pub_analyzer/models/report.py +111 -0
  27. pub_analyzer/models/source.py +77 -0
  28. pub_analyzer/models/topic.py +59 -0
  29. pub_analyzer/models/work.py +158 -0
  30. pub_analyzer/widgets/__init__.py +1 -0
  31. pub_analyzer/widgets/author/__init__.py +1 -0
  32. pub_analyzer/widgets/author/cards.py +65 -0
  33. pub_analyzer/widgets/author/core.py +122 -0
  34. pub_analyzer/widgets/author/tables.py +50 -0
  35. pub_analyzer/widgets/body.py +55 -0
  36. pub_analyzer/widgets/common/__init__.py +18 -0
  37. pub_analyzer/widgets/common/card.py +29 -0
  38. pub_analyzer/widgets/common/filesystem.py +203 -0
  39. pub_analyzer/widgets/common/filters.py +111 -0
  40. pub_analyzer/widgets/common/input.py +97 -0
  41. pub_analyzer/widgets/common/label.py +36 -0
  42. pub_analyzer/widgets/common/modal.py +43 -0
  43. pub_analyzer/widgets/common/selector.py +66 -0
  44. pub_analyzer/widgets/common/summary.py +7 -0
  45. pub_analyzer/widgets/institution/__init__.py +1 -0
  46. pub_analyzer/widgets/institution/cards.py +78 -0
  47. pub_analyzer/widgets/institution/core.py +122 -0
  48. pub_analyzer/widgets/institution/tables.py +24 -0
  49. pub_analyzer/widgets/report/__init__.py +1 -0
  50. pub_analyzer/widgets/report/author.py +43 -0
  51. pub_analyzer/widgets/report/cards.py +130 -0
  52. pub_analyzer/widgets/report/concept.py +47 -0
  53. pub_analyzer/widgets/report/core.py +308 -0
  54. pub_analyzer/widgets/report/editor.py +80 -0
  55. pub_analyzer/widgets/report/export.py +112 -0
  56. pub_analyzer/widgets/report/grants.py +85 -0
  57. pub_analyzer/widgets/report/institution.py +39 -0
  58. pub_analyzer/widgets/report/locations.py +75 -0
  59. pub_analyzer/widgets/report/source.py +90 -0
  60. pub_analyzer/widgets/report/topic.py +55 -0
  61. pub_analyzer/widgets/report/work.py +391 -0
  62. pub_analyzer/widgets/search/__init__.py +11 -0
  63. pub_analyzer/widgets/search/core.py +96 -0
  64. pub_analyzer/widgets/search/results.py +82 -0
  65. pub_analyzer/widgets/sidebar.py +70 -0
  66. pub_analyzer-0.5.6.dist-info/METADATA +102 -0
  67. pub_analyzer-0.5.6.dist-info/RECORD +70 -0
  68. pub_analyzer-0.5.6.dist-info/WHEEL +4 -0
  69. pub_analyzer-0.5.6.dist-info/entry_points.txt +3 -0
  70. pub_analyzer-0.5.6.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1 @@
1
+ """Publication Analyzer Core Module."""
@@ -0,0 +1,7 @@
1
+ """Main entry point."""
2
+
3
+ from pub_analyzer.main import PubAnalyzerApp
4
+
5
+ if __name__ == "__main__":
6
+ app = PubAnalyzerApp()
7
+ app.run()
@@ -0,0 +1,87 @@
1
+ /* COLORS */
2
+ $bg-main-color: white;
3
+ $bg-secondary-color: #e5e7eb;
4
+ $text-primary-color: black;
5
+
6
+ $bg-main-color-darken: #1e293b;
7
+ $bg-secondary-color-darken: #0f172a;
8
+ $text-primary-color-darken: white;
9
+
10
+ /* SideBar CSS */
11
+ SideBar {
12
+ dock: left;
13
+ width: 20;
14
+
15
+ background: $bg-secondary-color;
16
+ color: $text-primary-color;
17
+
18
+ Button {
19
+ text-align: start;
20
+ }
21
+
22
+ #sidebar-title {
23
+ width: 100%;
24
+ content-align: left middle;
25
+ text-style: bold;
26
+ border-bottom: heavy $text-primary-color;
27
+ }
28
+
29
+ .sidebar-options-column {
30
+ margin: 1;
31
+ padding: 1 1;
32
+ }
33
+
34
+ .sidebar-buttons-column {
35
+ height: 1fr;
36
+
37
+ .sidebar-option {
38
+ content-align: left middle;
39
+ margin: 1 0;
40
+ width: 100%;
41
+ }
42
+ }
43
+
44
+ #module-version-label {
45
+ color: $text-primary-color 25%;
46
+ text-align: center;
47
+ width: 100%;
48
+ }
49
+ }
50
+
51
+ .-dark-mode SideBar {
52
+ background: $bg-secondary-color-darken;
53
+ color: $text-primary-color-darken;
54
+
55
+ #sidebar-title {
56
+ border-bottom: heavy $text-primary-color-darken;
57
+ }
58
+
59
+ #module-version-label {
60
+ color: $text-primary-color-darken 25%;
61
+ }
62
+ }
63
+
64
+ /* Main Content CSS */
65
+ MainContent {
66
+ background: $bg-main-color;
67
+ color: $text-primary-color;
68
+
69
+ padding: 2 1 0 1;
70
+ height: 100%;
71
+
72
+ .title {
73
+ content-align: left middle;
74
+ text-style: bold;
75
+ border-bottom: heavy $text-primary-color;
76
+ width: 100%
77
+ }
78
+ }
79
+
80
+ .-dark-mode MainContent {
81
+ background: $bg-main-color-darken;
82
+ color: $text-primary-color-darken;
83
+
84
+ .title {
85
+ border-bottom: heavy $text-primary-color-darken;
86
+ }
87
+ }
@@ -0,0 +1,24 @@
1
+ /* COLORS */
2
+ $primary-color: #b91c1c;
3
+ $primary-color-accent: #991b1b;
4
+ $primary-color-highlight: #dc2626;
5
+
6
+ /* Primary variant */
7
+ Button.-primary {
8
+ background: $primary-color;
9
+ color: white;
10
+ border-top: tall $primary-color-highlight;
11
+ border-bottom: tall black;
12
+ }
13
+
14
+ Button.-primary:hover {
15
+ background: $primary-color-accent;
16
+ color: white;
17
+ border-top: tall $primary-color-highlight;
18
+ }
19
+
20
+ Button.-primary.-active {
21
+ background: $primary-color;
22
+ border-top: tall $primary-color-highlight;
23
+ border-bottom: tall black;
24
+ }
@@ -0,0 +1,29 @@
1
+ /* COLORS */
2
+ $primary-color-accent: #991b1b;
3
+
4
+ $bg-main-color: white;
5
+ $bg-main-color-darken: #1e293b;
6
+
7
+ ToggleButton {
8
+ background: transparent;
9
+ }
10
+
11
+ ToggleButton:focus {
12
+ border: tall transparent;
13
+ }
14
+
15
+ ToggleButton:hover {
16
+ text-style: bold;
17
+ background: transparent;
18
+ }
19
+
20
+ /* Button colours. */
21
+ ToggleButton > .toggle--button {
22
+ color: $bg-main-color;
23
+ text-style: bold;
24
+ background: $bg-main-color-darken 25%;
25
+ }
26
+
27
+ ToggleButton.-on > .toggle--button {
28
+ background: $primary-color-accent;
29
+ }
@@ -0,0 +1,31 @@
1
+ /* COLORS */
2
+ $bg-main-color: white;
3
+ $bg-secondary-color: #e5e7eb;
4
+ $bg-secondary-color-accent: #d1d5db;
5
+ $text-primary-color: black;
6
+
7
+ $bg-main-color-darken: #1e293b;
8
+ $bg-secondary-color-darken: #0f172a;
9
+ $text-primary-color-darken: black;
10
+
11
+ CollapsibleTitle {
12
+ background: transparent;
13
+ color: $text-primary-color;
14
+ }
15
+
16
+ CollapsibleTitle:hover {
17
+ background: transparent;
18
+ text-style: bold;
19
+ color: $text-primary-color;
20
+ }
21
+
22
+ CollapsibleTitle:focus {
23
+ background: transparent;
24
+ text-style: bold;
25
+ color: $text-primary-color;
26
+ }
27
+
28
+ Collapsible {
29
+ background: transparent;
30
+ border: none;
31
+ }
@@ -0,0 +1,50 @@
1
+ /* COLORS */
2
+ $bg-main-color: white;
3
+ $bg-secondary-color: #e5e7eb;
4
+ $bg-secondary-color-accent: #d1d5db;
5
+ $text-primary-color: black;
6
+
7
+ $bg-main-color-darken: #1e293b;
8
+ $bg-secondary-color-darken: #0f172a;
9
+ $text-primary-color-darken: black;
10
+
11
+ $primary-color: #b91c1c;
12
+ $primary-color-accent: #991b1b;
13
+ $primary-color-highlight: #dc2626;
14
+
15
+ /* Common */
16
+ DataTable {
17
+ background: $bg-main-color;
18
+ color: $text-primary-color;
19
+ height: 1fr;
20
+ }
21
+
22
+ .-dark-mode DataTable {
23
+ background: $bg-secondary-color;
24
+ }
25
+
26
+ /* Header */
27
+ DataTable > .datatable--header {
28
+ text-style: bold;
29
+ background: $bg-secondary-color;
30
+ color: $text-primary-color;
31
+ }
32
+
33
+ DataTable > .datatable--header-hover {
34
+ background: $bg-secondary-color-accent;
35
+ }
36
+
37
+ /* Rows */
38
+ DataTable > .datatable--hover {
39
+ background: $primary-color 35%;
40
+ }
41
+
42
+ /* Hover */
43
+ DataTable > .datatable--cursor {
44
+ background: $primary-color-accent;
45
+ text-style: bold;
46
+ }
47
+
48
+ DataTable > .datatable--header-cursor {
49
+ background: $primary-color;
50
+ }
@@ -0,0 +1,60 @@
1
+ /* COLORS */
2
+ $bg-main-color: white;
3
+ $bg-secondary-color: #e5e7eb;
4
+ $bg-secondary-color-accent: #d1d5db;
5
+ $text-primary-color: black;
6
+
7
+ $bg-main-color-darken: #1e293b;
8
+ $bg-secondary-color-darken: #0f172a;
9
+ $text-primary-color-darken: black;
10
+
11
+ $primary-color: #b91c1c;
12
+ $primary-color-accent: #991b1b;
13
+ $primary-color-highlight: #dc2626;
14
+
15
+ TextEditor {
16
+ #dialog {
17
+ margin: 0 10;
18
+ min-height: 10vh;
19
+ max-height: 60vh;
20
+ }
21
+
22
+ #text-editor-container {
23
+ height: 1fr;
24
+ }
25
+
26
+ TextArea{
27
+ height: auto;
28
+ padding: 1 3;
29
+
30
+ background: $bg-main-color;
31
+ border: none;
32
+
33
+ .text-area--cursor {
34
+ background: $primary-color;
35
+ }
36
+ .text-area--cursor-gutter {
37
+ color: $bg-main-color;
38
+ background: $primary-color-accent;
39
+ }
40
+ .text-area--cursor-line {
41
+ background: $bg-main-color;
42
+ }
43
+ .text-area--matching-bracket {
44
+ background: $primary-color-highlight 30%;
45
+ }
46
+
47
+ }
48
+
49
+ #actions-buttons {
50
+ height: 3;
51
+ margin-top: 1;
52
+ margin-bottom: 2;
53
+
54
+ align: center middle;
55
+
56
+ Button {
57
+ margin: 0 5;
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,50 @@
1
+ /* COLORS */
2
+ $primary-color: #b91c1c;
3
+ $primary-color-accent: #991b1b;
4
+ $primary-color-highlight: #dc2626;
5
+
6
+ * {
7
+ scrollbar-color: $primary-color;
8
+ scrollbar-color-active: $primary-color-accent;
9
+ scrollbar-color-hover: $primary-color-highlight;
10
+
11
+ transition: background 500ms in_out_cubic, color 500ms in_out_cubic;
12
+ }
13
+
14
+ Body {
15
+ layout: horizontal;
16
+ height: 1fr;
17
+ }
18
+
19
+ Footer {
20
+ dock: bottom;
21
+ background: $primary-color;
22
+
23
+ FooterKey {
24
+ background: $primary-color;
25
+ color: white;
26
+
27
+ .footer-key--key {
28
+ text-style: bold;
29
+ color: white;
30
+ background: $primary-color-accent;
31
+ }
32
+
33
+ &:hover {
34
+ background: $primary-color-highlight;
35
+ color: white;
36
+ text-style: bold;
37
+ .footer-key--key {
38
+ background: $primary-color-accent;
39
+ }
40
+ }
41
+ }
42
+ }
43
+
44
+ LoadingIndicator {
45
+ color: $primary-color-accent;
46
+ }
47
+
48
+ LoadingIndicator.-textual-loading-indicator {
49
+ background: transparent;
50
+ }
@@ -0,0 +1,131 @@
1
+ /* COLORS */
2
+ $bg-main-color: white;
3
+ $bg-secondary-color: #e5e7eb;
4
+ $bg-secondary-color-accent: #d1d5db;
5
+ $text-primary-color: black;
6
+
7
+ $bg-main-color-darken: #1e293b;
8
+ $bg-secondary-color-darken: #0f172a;
9
+ $text-primary-color-darken: black;
10
+
11
+ $primary-color: #b91c1c;
12
+ $primary-color-accent: #991b1b;
13
+ $primary-color-highlight: #dc2626;
14
+
15
+ ReportWidget {
16
+ height: 1fr;
17
+ margin: 1 2;
18
+
19
+ #main-container {
20
+ height: 100%;
21
+ }
22
+ }
23
+
24
+ .-dark-mode ReportWidget {
25
+ background: $bg-secondary-color;
26
+ color: $text-primary-color-darken;
27
+ }
28
+
29
+ /* Common */
30
+ ReportWidget .cards-container {
31
+ height: auto;
32
+ margin: 1 0 0 0 ;
33
+
34
+ layout: grid;
35
+ grid-size: 3 1;
36
+ grid-rows: 13;
37
+ grid-columns: 1fr;
38
+ grid-gutter: 1 2;
39
+ }
40
+
41
+ /* Create Report */
42
+ CreateReportWidget {
43
+ height: 1fr;
44
+ }
45
+
46
+ /* Load Report */
47
+ LoadReportWidget {
48
+ margin: 1 1 0 1;
49
+ }
50
+
51
+ LoadReportWidget .filesystem-selector-container {
52
+ height: 5;
53
+ }
54
+
55
+ LoadReportWidget FileSystemSelector {
56
+ width: 3fr;
57
+ }
58
+
59
+ LoadReportWidget EntityTypeSelector {
60
+ width: 1fr;
61
+ margin-bottom: 1;
62
+ }
63
+
64
+ LoadReportWidget .button-container {
65
+ align: center middle;
66
+ height: 3;
67
+ }
68
+
69
+ /* Export Report Pane */
70
+ #export-form {
71
+ height: auto;
72
+ }
73
+
74
+ .export-form-input-container {
75
+ height: auto;
76
+ margin-bottom: 2;
77
+ }
78
+
79
+ .export-form-label {
80
+ width: 25vw;
81
+ border-bottom: solid $text-primary-color;
82
+ }
83
+
84
+ .file-selector-container {
85
+ height: 3;
86
+ }
87
+
88
+ .export-form-input {
89
+ width: 50vw;
90
+ }
91
+
92
+ .export-form-buttons {
93
+ align: center middle;
94
+ height: 3;
95
+ }
96
+
97
+ /* Work Modal */
98
+ WorkModal #dialog .cards-container {
99
+ height: auto;
100
+ width: 100%;
101
+ padding: 0 2;
102
+
103
+ layout: grid;
104
+ grid-size: 3 1;
105
+ grid-rows: 15;
106
+ grid-columns: 1fr;
107
+ grid-gutter: 1 2;
108
+ }
109
+
110
+ WorkModal #dialog .abstract {
111
+ height: auto;
112
+ width: 100%;
113
+ padding: 1 2;
114
+ }
115
+
116
+ WorkModal TabPane EditWidget {
117
+ height: 3;
118
+ margin-top: 1;
119
+
120
+ Horizontal {
121
+ align: center middle;
122
+ }
123
+ }
124
+
125
+ WorkModal #dialog #tables-container {
126
+ margin: 1 0;
127
+ }
128
+
129
+ WorkModal #dialog ContentSwitcher {
130
+ height: auto;
131
+ }
@@ -0,0 +1,81 @@
1
+ /* COLORS */
2
+ $bg-main-color: white;
3
+ $bg-secondary-color: #e5e7eb;
4
+ $bg-secondary-color-accent: #d1d5db;
5
+ $text-primary-color: black;
6
+
7
+ $bg-main-color-darken: #1e293b;
8
+ $bg-secondary-color-darken: #0f172a;
9
+ $text-primary-color-darken: black;
10
+
11
+ /* Finder */
12
+ FinderWidget {
13
+ height: 1fr;
14
+ }
15
+
16
+ FinderWidget #results-container {
17
+ overflow: auto;
18
+ margin: 1 2;
19
+ }
20
+
21
+ /* Searchbar */
22
+ FinderWidget .searchbar-container {
23
+ height: 4;
24
+ }
25
+
26
+ SearchBar {
27
+ width: 3fr;
28
+ height: 3;
29
+ padding: 0 1;
30
+ margin: 1 1 0 1;
31
+ }
32
+
33
+ EntityTypeSelector {
34
+ width: 1fr;
35
+ margin-top: 1;
36
+ }
37
+
38
+ /* Result Widget */
39
+ ResultWidget {
40
+ height: 9;
41
+ layout: horizontal;
42
+ border: $text-primary-color wide;
43
+ margin: 1 0;
44
+ background: $bg-secondary-color;
45
+ }
46
+
47
+ .-dark-mode ResultWidget {
48
+ color: $text-primary-color-darken;
49
+ }
50
+
51
+ ResultWidget Button {
52
+ height: 100%;
53
+ width: 1fr;
54
+ text-align: center;
55
+ border: $text-primary-color solid;
56
+ padding: 0 1;
57
+ }
58
+
59
+ .-dark-mode ResultWidget Button {
60
+ background: $bg-secondary-color;
61
+ }
62
+
63
+ ResultWidget .vertical-content {
64
+ height: 100%;
65
+ width: 4fr;
66
+ border: black solid;
67
+ padding: 0 1;
68
+ }
69
+
70
+ ResultWidget .main-info-container {
71
+ height: auto;
72
+ margin-bottom: 1;
73
+ }
74
+
75
+ ResultWidget .main-info-container Static {
76
+ width: 1fr;
77
+ }
78
+
79
+ ResultWidget .text-hint {
80
+ max-height: 3;
81
+ }
@@ -0,0 +1,75 @@
1
+ /* COLORS */
2
+ $bg-main-color: white;
3
+ $bg-secondary-color: #e5e7eb;
4
+ $bg-secondary-color-accent: #d1d5db;
5
+ $text-primary-color: black;
6
+
7
+ $bg-main-color-darken: #1e293b;
8
+ $bg-secondary-color-darken: #0f172a;
9
+ $text-primary-color-darken: black;
10
+
11
+ SummaryWidget {
12
+ height: 1fr;
13
+ margin: 1 2;
14
+
15
+ /* Titles */
16
+ .block-title {
17
+ text-align: center;
18
+ width: 100%;
19
+ border-bottom: solid $text-primary-color;
20
+ }
21
+
22
+ /* Block Container */
23
+ .block-container {
24
+ padding: 1;
25
+ height: auto;
26
+ }
27
+
28
+ /* Cards */
29
+ .cards-container {
30
+ height: auto;
31
+ margin: 1 0 0 0 ;
32
+
33
+ layout: grid;
34
+ grid-size: 3 1;
35
+ grid-rows: 14;
36
+ grid-columns: 1fr;
37
+ grid-gutter: 1 2;
38
+ }
39
+
40
+ /* Info Container */
41
+ .info-container {
42
+ height: auto;
43
+
44
+ Label {
45
+ text-align: center;
46
+ width: 1fr;
47
+ }
48
+ }
49
+
50
+ /* Table */
51
+ .table-container {
52
+ height: auto;
53
+ margin: 1 0 0 0;
54
+ }
55
+
56
+ /* Filter Container */
57
+ .filter-collapsible {
58
+ margin-top: 1;
59
+
60
+ DateRangeFilter {
61
+ margin-top: 1;
62
+ }
63
+ }
64
+
65
+ /* Buttons */
66
+ .button-container {
67
+ align: center middle;
68
+ height: 5;
69
+ }
70
+ }
71
+
72
+ .-dark-mode SummaryWidget {
73
+ color: $text-primary-color-darken;
74
+ background: $bg-secondary-color;
75
+ }
@@ -0,0 +1,18 @@
1
+ /* COLORS */
2
+ $primary-color: #b91c1c;
3
+ $primary-color-accent: #991b1b;
4
+ $primary-color-highlight: #dc2626;
5
+
6
+
7
+ /* Tab */
8
+ Tabs:focus .underline--bar {
9
+ background: black 20%;
10
+ }
11
+
12
+ .-dark-mode Tabs:focus .underline--bar {
13
+ background: black 30%;
14
+ }
15
+
16
+ Tabs Underline > .underline--bar {
17
+ color: $primary-color;
18
+ }
@@ -0,0 +1,44 @@
1
+ /* COLORS */
2
+ $bg-main-color: white;
3
+ $bg-secondary-color: #e5e7eb;
4
+ $bg-secondary-color-accent: #d1d5db;
5
+ $text-primary-color: black;
6
+
7
+ $bg-main-color-darken: #1e293b;
8
+ $bg-secondary-color-darken: #0f172a;
9
+ $text-primary-color-darken: black;
10
+
11
+ $primary-color: #b91c1c;
12
+ $primary-color-accent: #991b1b;
13
+ $primary-color-highlight: #dc2626;
14
+
15
+
16
+ Tree {
17
+ background: $bg-main-color;
18
+ color: $text-primary-color;
19
+ }
20
+
21
+ .-dark-mode Tree {
22
+ background: $bg-secondary-color;
23
+ }
24
+
25
+ Tree > .tree--guides {
26
+ color: $text-primary-color;
27
+ }
28
+
29
+ Tree > .tree--guides-hover {
30
+ color: $primary-color-highlight;
31
+ }
32
+
33
+ Tree > .tree--guides-selected {
34
+ color: $primary-color-highlight;
35
+ }
36
+
37
+ Tree > .tree--cursor {
38
+ background: $primary-color;
39
+ }
40
+
41
+ Tree:focus > .tree--cursor {
42
+ background: $primary-color-accent;
43
+ color: $bg-main-color;
44
+ }
@@ -0,0 +1 @@
1
+ """Core functions."""