{"id":38215,"date":"2019-10-31T22:22:20","date_gmt":"2019-10-31T19:22:20","guid":{"rendered":"https:\/\/prohoster.info\/blog\/kategorii-vmesto-direktorij-instrument-dlya-udobnogo-hraneniya-fajlov\/"},"modified":"2019-10-31T22:22:20","modified_gmt":"2019-10-31T19:22:20","slug":"kategorii-vmesto-direktorij-instrument-dlya-udobnogo-hraneniya-fajlov","status":"publish","type":"post","link":"https:\/\/prohoster.info\/da\/blog\/administrirovanie\/kategorii-vmesto-direktorij-instrument-dlya-udobnogo-hraneniya-fajlov","title":{"rendered":"Kategorier i stedet for mapper. Et v\u00e6rkt\u00f8j til nem opbevaring af filer","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Inspi\u00adreret af <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/457328\/\">en artikel<\/a><\/noindex> <\/p>\n<p><\/p>\n<blockquote><p>\u00abKategorier i stedet for mapper, eller En semantisk filsystem til Linux Vitis\u00bb<\/p><\/blockquote>\n<p>besluttede jeg at lave min egen analog af v\u00e6rkt\u00f8jet <code>vitis<\/code> til PowerShell Core.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2 id=\"zachem-ya-nachal-eto-delat\">Hvorfor jeg begyndte at g\u00f8re dette<\/h2>\n<p><\/p>\n<p>For det f\u00f8rste, <code>vitis<\/code> kun for Linux.<br \/>\nFor det andet \u00f8nsker jeg at bruge \u00abr\u00f8r\u00bb i PowerShell.<\/p>\n<p><\/p>\n<p>Da jeg ville lave et tv\u00e6rplatformsv\u00e6rkt\u00f8j, valgte jeg .Net Core.<\/p>\n<p><\/p>\n<h2 id=\"predystoriya\">Background<\/h2>\n<p><\/p>\n<p>F\u00f8rst var der kaos. S\u00e5 dukkede der mapper op p\u00e5 disken.<br \/>\nMen kaos herskede stadig. Og tags, samt sub-tags og synonymer til tags dukkede op. Men kaos greb ogs\u00e5 dem. Og kategorier blev opfundet.<\/p>\n<p><\/p>\n<h2 id=\"koncepciya\">Koncept<\/h2>\n<p><\/p>\n<p>Filer gemmes ikke i en mappestruktur, men i en \u00abbunke\u00bb med bestemte kategorier. En fil kan tilh\u00f8re flere kategorier.<\/p>\n<p><\/p>\n<p>Hvis du skal finde en fil, er det lettere at indtaste de kategorier, den tilh\u00f8rer. Det er meget lettere at huske, end i hvilke mapper den er gemt.<\/p>\n<p><\/p>\n<p>Men et s\u00e5dan filsystem er p\u00e5 ingen m\u00e5de egnet til opbevaring af kode, kildekoder osv.<br \/>\nDet er beregnet til at gemme, for eksempel, familiebilleder, musik, dokumenter.<\/p>\n<p><\/p>\n<h2 id=\"ispolzovanie\">Brugen af<\/h2>\n<p><\/p>\n<p>N\u00e5, lad os begynde demonstrationen.<\/p>\n<p><\/p>\n<p>Lad os installere Graphile:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\"># install.ps1 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0441 \u043a\u043e\u0434\u043e\u043c\nPS D:SourcereposGraphile&gt; .install.ps1<\/code><\/pre>\n<p><\/p>\n<p>F\u00f8rst initialiserer vi Graphile i mappen:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\"># \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c\nPS C:UsersDellGraphileTest&gt; Import-Module GraphilePowerShell\n# \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c Graphile \u0432 \u043f\u0430\u043f\u043a\u0435\nPS C:UsersDellGraphileTest&gt; Init-Graphile\nC:UsersDellGraphileTestgraphile.db<\/code><\/pre>\n<p><\/p>\n<p>S\u00e5, nu har vi sat alt op. Nu kan vi oprette en ny kategori:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">PS C:UsersDellGraphileTest&gt; New-Category -Name \"music\"\nmusic<\/code><\/pre>\n<p><\/p>\n<p>Lad os tilf\u00f8je filer:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">PS C:UsersDellGraphileTest&gt; Get-ChildItem \"D:MusicPink Floyd - The Wall\" -Recurse -Filter \"*.mp3\" | foreach { $_.FullName } | foreach {\n&gt;&gt; Add-FileToCategory -File $_ -Categories \"music\"\n&gt;&gt; }<\/code><\/pre>\n<p><\/p>\n<p>Til dem, der ikke forstod, hvad jeg gjorde:<\/p>\n<p><\/p>\n<ol>\n<li>Jeg fik en liste over filer i mappen <code>Pink Floyd - The Wall<\/code><\/li>\n<li>Hver fil blev konverteret til sin fulde sti<\/li>\n<li>Tilf\u00f8jede hver fil til kategorien <code>music<\/code><\/li>\n<\/ol>\n<p><\/p>\n<p>Lad os nu se, om vi virkelig har tilf\u00f8jet filer til kategorien:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">PS C:UsersDellGraphileTest&gt; List-Graphiles | Format-Table<\/code><\/pre>\n<p><\/p>\n<p>Der vil blive vist en liste i formatet:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">KategorierNavne ID Kategorier Navn Udvidelse<\/code><\/pre>\n<p><\/p>\n<p>Lad os tilf\u00f8je flere kategorier og filer:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">New-Category -Name \"the-wall\"\nNew-Category -Name \"alan-parsons\"\n\nList-Graphiles -Categories \"music\" | foreach { Add-GraphileToCategory -Categories \"the-wall\" -Files $_.Name }\n\nGet-ChildItem \"D:MusicThe Alan Parsons Project - Turn of a Friendly Card\" -File -Recurse | foreach { $_.FullName } | foreach { Add-FileToCategory -File $_ -Categories \"music\", \"alan-parsons\" }<\/code><\/pre>\n<p><\/p>\n<p>Lad os tjekke filerne:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">List-Graphiles -Categories \"alan-parsons\" | Format-Table<\/code><\/pre>\n<p><\/p>\n<p>Kommandoen vil vise alle filer, der tilh\u00f8rer kategorien <code>alan-parsons<\/code>.<\/p>\n<p><\/p>\n<p>Flere filer til filgudernes \u00e6re!<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">New-Category -Name \"images\"\nGet-ChildItem \"D:Billeder\" -File -Recurse | foreach { $.FullName } | foreach {\n    Add-FileToCategory -File $_ -Categories \"images\"\n}<\/code><\/pre>\n<p><\/p>\n<p>Vi tjekker:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">List-Graphiles -Categories \"images\" | Format-Table<\/code><\/pre>\n<p><\/p>\n<p>Alt fungerer!<\/p>\n<p><\/p>\n<p>Men det er kun begyndelsen. Eksport\u00e9r dit almindelige filsystem til Graphile og f\u00e5 en fremragende organisering af filer.<\/p>\n<p><\/p>\n<h2 id=\"otkuda-skachat-graphile\">Hvor kan jeg downloade Graphile<\/h2>\n<p><\/p>\n<p>Her er <noindex><a rel=\"nofollow\" href=\"https:\/\/gitlab.com\/georgeBartolomey\/graphile\">link<\/a><\/noindex> p\u00e5 GitLab Graphile\u2019s.<\/p>\n<p><\/p>\n<p>Licens <code>MIT<\/code>, s\u00e5 du kan endda bruge det til kommercielle form\u00e5l.<\/p>\n<p><\/p>\n<h2 id=\"buduschee-proekta\">Projektets fremtid<\/h2>\n<p><\/p>\n<p>Da dette er PowerShell og ikke noget pjatt, kan man lave et grafisk interface i .NET Core.<\/p>\n<p><\/p>\n<p>S\u00e5dan g\u00f8r du:<\/p>\n<p><\/p>\n<ol>\n<li>Installer Microsoft.PowerShell.SDK-pakken<\/li>\n<li>Brug PowerShell-klassen og kald Graphile.<\/li>\n<\/ol>\n<p><\/p>\n<p>Hvis du kan lide projektet, s\u00e5 lav commits, <code>merge request<\/code>\u2018er og skab diskussioner.<\/p>\n<p><\/p>\n<p>Tak for l\u00e6sningen! Brug det og nyd det!<\/p>\n<p>Kilde: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/467701\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u0435\u0439 &#171;\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439, \u0438\u043b\u0438 \u0421\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f Linux Vitis&#187;, \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 \u0443\u0442\u0438\u043b\u0438\u0442\u044b vitis \u0434\u043b\u044f PowerShell Core. \u0417\u0430\u0447\u0435\u043c \u044f \u043d\u0430\u0447\u0430\u043b \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0412\u043e \u043f\u0435\u0440\u0432\u044b\u0445, vitis \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f Linux. \u0412\u043e \u0432\u0442\u043e\u0440\u044b\u0445, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f &#171;\u0442\u0440\u0443\u0431\u0430\u043c\u0438&#187; \u0432 PowerShell. \u0422\u0430\u043a \u043a\u0430\u043a \u044f \u0437\u0430\u0445\u043e\u0442\u0435\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443, \u044f \u0432\u044b\u0431\u0440\u0430\u043b .Net Core. \u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u044b\u043b \u0445\u0430\u043e\u0441. [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-38215","post","type-post","status-publish","format-standard","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u0435\u0439 &quot;\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439, \u0438\u043b\u0438 \u0421\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f Linux.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/da\/blog\/administrirovanie\/kategorii-vmesto-direktorij-instrument-dlya-udobnogo-hraneniya-fajlov\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"da_DK\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u0435\u0439 &quot;\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439, \u0438\u043b\u0438 \u0421\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f Linux.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/da\/blog\/administrirovanie\/kategorii-vmesto-direktorij-instrument-dlya-udobnogo-hraneniya-fajlov\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T19:22:20+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:22:20+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Kategorier i stedet for mapper. Et v\u00e6rkt\u00f8j til bekvem filopbevaring | ProHoster","description":"Inspireret af artiklen \"Kategorier i stedet for mapper, eller En semantisk fils\u00f8gning for Linux.","canonical_url":"https:\/\/prohoster.info\/da\/blog\/administrirovanie\/kategorii-vmesto-direktorij-instrument-dlya-udobnogo-hraneniya-fajlov","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"da_DK","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 | ProHoster","og:description":"\u0412\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u0435\u0439 &quot;\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439, \u0438\u043b\u0438 \u0421\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f Linux.","og:url":"https:\/\/prohoster.info\/da\/blog\/administrirovanie\/kategorii-vmesto-direktorij-instrument-dlya-udobnogo-hraneniya-fajlov","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T19:22:20+00:00","article:modified_time":"2019-10-31T19:22:20+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"38215","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-23 20:58:21","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:13:22","updated":"2026-01-23 20:58:21","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/posts\/38215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/comments?post=38215"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/posts\/38215\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/media?parent=38215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/categories?post=38215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/tags?post=38215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}